#ifndef _FBFLOW_H_
#define _FBFLOW_H_


#include <stdio.h>
#include <stdlib.h>
#include <list>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <dirent.h>
#include <unistd.h>
#include <sys/param.h>
//#include <klt.h>
#include <limits>
#include "Opencv.h"


using namespace std;

class FB
{
 public:
  cv::Mat prevGray;
  cv::Mat currGray;
  cv::Mat flow;
  int step;
 public:
  
  FB(){
    step = 5;
  } 
  void setImageParam(cv::Mat input);

  void calcFB(cv::Mat input);

  void getFlowPoint(vector<Point2f> *flowPoint);

  void getFlowScale(vector<Point2f> *flowScale);

  int getFeatureNum(){return flow.rows*flow.cols;}

  void firstProc(cv::Mat srcimage);

  void Proc(std::string dirname, int imcount, cv::Mat& output,vector<Point2f> &flowPoint,vector<Point2f> &flowscale);

};

#endif
